<script>
import config from './config'
import {getToken} from '@/utils/token'

export default {
  data() {
    return {
      globalData: null,
    }
  },
  created() {
  },
  onLaunch: function () {
    this.checkLogin()
    this.initApp()
  },
  methods: {
    // 初始化应用
    initApp() {
      this.initConfig()
    },
    initConfig() {
      this.globalData.config = config
    },
    checkLogin() {
      if (!getToken()) {
        // uni.reLaunch({url: "/pages/login"})
      }
    }
  }
}
</script>

<style lang="scss">
uni-page-body,html,body{
  height: 100%;
  background-color: #f8f8f8;
}
@import "uview-ui/index.scss";
</style>
